<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>16 同时运动</title>
    <style type="text/css">
        #box {
            width: 200px;
            height: 200px;
            background-color: #DA70D6;
        }
    </style>
</head>

<body>
    <div id="box"></div>
    <script src="js/myAnimation2.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        window.onload = function() {
            var box = document.getElementById('box');
            box.onmouseover = function() {
                startAnimation(box, {
                    "width": 500,
                    "opacity": 30,
                });
            }
            box.onmouseout = function() {
                startAnimation(box, {
                    "width": 200,
                    "opacity": 100,
                });
            }

        }
    </script>
</body>

</html>